# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def menu_item_css_class(controller)
    if controller == params[:controller]
      return { :class => 'active' }
    else
      return {}
    end
  end
  
  def form_submit_value
    if controller.action_name == 'new' or controller.action_name == 'create'
      'Создать'
    elsif controller.action_name == 'edit' or controller.action_name == 'update'
      'Обновить'
    else
      'Неизвестно'
    end
  end
end
